const loginForm = document.getElementById('loginForm');
const message = document.getElementById('message');

loginForm.addEventListener('submit', function (e) {
    e.preventDefault();
    const username = document.getElementById('username').value;
    const password = document.getElementById('password').value;

    if (username === 'admin' && password === 'password') {
        // 登录成功，跳转到登录后界面
        window.location.href = 'dashboard.html';
    } else {
        message.textContent = '用户名或密码错误，请重试。';
        message.style.color = 'red';
    }
});
    